#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
int n, m;
int a[N];
bool ask(int x, int l, int r) {
  cout << "? " << x << ' ';
  cout << r + 1 - l << ' ';
  rep(i, l, r) cout << i << " \n"[i == r];
  cout.flush();
  cin >> x;
  return x;
}
void ans(int x) {
  cout << "! " << x << endl;
  cout.flush();
}
void solve() {
  cin >> n;
  int l = 1, r = n * 2 - 1;
  set<int> st2, st1;
  rep(i, 1, n) st2.insert(i);
  while (st2.size() > 1) {
    int mid = (l + r) >> 1;
    set<int> left, right, both;
    for (int x : st2) {
      bool res1 = false, res2 = false;
      res1 = ask(x, l, mid);
      if (!res1)
        res2 = true;
      else
        res2 = ask(x, mid + 1, r);
      if (res1 && res2)
        both.insert(x);
      else if (res1)
        left.insert(x);
      else
        right.insert(x);
    }
    set<int> st11, st12;
    for (int x : st1) {
      if (ask(x, l, mid))
        st11.insert(x);
      else
        st12.insert(x);
    }
    int L1 = left.size() * 2 + both.size() + st11.size();
    if (L1 == mid + 1 - l) {  // cand is on the right
      swap(st2, right);
      swap(st1, both);
      if (st1.size() < st12.size()) swap(st1, st12);
      for (int x : st12) st1.insert(x);
      l = mid + 1;
    } else {
      swap(st2, left);
      swap(st1, both);
      if (st1.size() < st11.size()) swap(st1, st11);
      for (int x : st11) st1.insert(x);
      r = mid;
    }
  }
  ans(*st2.begin());
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}